#include"server/server.hpp"

//测试超过非活跃超时时间，是否会释放连接
int main()
{
    Socket client_sock;
    client_sock.CreateClient(8888,"127.0.0.1");
    std::string httprequest;
    httprequest += "GET /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    while(1)
    {
        assert(client_sock.Send(httprequest.c_str(),httprequest.size()) != -1);
        char buffer[1024] = {0};
        assert(client_sock.Recv(buffer,1023) != -1);

        DBG_LOG("[%s]",buffer);

        sleep(10);
    }
    return 0;
}